import request from '@/utils/request'

export function getEnterPriseListApi(params){
    return request({url:'/park/enterprise',params})
}
export function getRentApi(id){
    return request({url:`park/enterprise/rent/${id}`})
}
/**
 * 获取楼宇列表
 * @param {*} id
 * @returns
 */
export function getRentBuildListAPI() {
    return request({
      url: '/park/rent/building'
    })
  }

  export function upLoad(data){
    return request({
        url:'upload',
        method:'post',
        data:data
    })
  }

  export function addContractApi(data){
    return request({url:'park/enterprise/rent',method:'post',data})
  }
  //所属行业查询
  export function queryIndustryApi(){
    return request({url:'/park/industry'})
  }
  //增加企业
  export function addEnterpriseApi(data){
    return request({url:'/park/enterprise',method:'post',data})
  }
  //获取企业详情
  export function getEnterpriseDetailApi(id){
    return request({url:`/park/enterprise/${id}`})
  }
  //删除企业
  export function delEnterpriseApi(id){
    return request({url: `/park/enterprise/${id}`,method:'delete'})
  }
  //编辑企业
  export function editEnterpriseApi(data){
    return request({url:'/park/enterprise',method:'put',data})
  }
  //删除企业的租赁合同
  export function delRentApi(id){
    return request({url:'/park/enterprise/rent/'+id,method:"delete"})
  }
  //退出企业的租赁合同
  export function cancelRentApi(id){
    return request({url:'/park/enterprise/rent/'+id,method:"put"})
  }
